{include file="admin@public/header" /}
{block name="style"}{/block}
<style>
	#sidebar-nav .nav>.open .submenu>li>.submenu a:before, #sidebar-nav .nav>.active .submenu>li>.submenu a:before {
    content: "";
	}
	body{font-size: 14px!important;}
	/* .open .submenu .active a{
		color: #03a9f4 !important;
	} */
</style>
<script type="text/javascript">


function SwitchFun(wxmpid){
	var url = "{:url('admin/index/switch')}"
	if (wxmpid)
	{
		$.ajax({
             type: "GET",
             url: url,
             data: {wxmpid:wxmpid},
             dataType: "json",
             success: function(data){
				if (data.code==200)
				{
					window.location.reload();
				}else{
					updateAlert('切换失败', 'error');

				}
			}
        });
	}
	
}

//点击页面其他地方关闭

document.onclick = function (e) {
    if(!$(e.target).is("#more") && $(".switch-mp").is(":visible")==true){
        $(".switch-mp").hide();
    }
	if ($(e.target).is("#more") && $(".switch-mp").is(":visible")===false)
	{
		
		$(".switch-mp").show();
	}
}

</script>
<div id="theme-wrapper">
	<header class="navbar" id="header-navbar">
		<div class="container">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#header-nav">
					<span class="sr-only">菜单</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a href="/admin" id="logo" class="navbar-brand">管理后台
				</a>
				{notempty name=":session('wxmpid')"}<button type="button" class="ant-btn clearfix" style="width: 140px; text-align: left; line-height: 26px;margin-top:10px" id="more" ><span class="btn-mp-text">{:session('webname')}</span><i class="fa fa-chevron-down pull-right" style="margin-top: 6px;"></i></button>{/notempty}
				<div class="switch-mp" style="display:none">
					<div class="switch-mp__cover"></div>
					<div class="switch-mp__main">
						<div class="mt">
							<button {if session('wxmpid')=='100000'}disabled{else}onclick="SwitchFun('100000')"{/if} type="button" class="ant-btn switch-mp__item "><span>全部</span></button>
						{volist name="site" id="vo"}
							<button {if session('wxmpid')==$vo['id']}disabled{else}onclick="SwitchFun({$vo['id']})"{/if} type="button" class="ant-btn switch-mp__item "><span>{$vo.webname}</span></button>
						{/volist}
						</div>
					</div>
				</div>

			</div>

			
			<div class="collapse navbar-collapse" id="header-nav" style="margin:0;padding:0">
				<ul class="nav navbar-nav">
					
				</ul>
				<ul class="nav navbar-nav pull-right">
					
					<li>
						<a href="{:url('admin/agent/article')}">
							<i class="fa fa-commenting-o"></i>
							消息
						</a>
					</li>
					
					<li>
						<a href="{:url('admin/User/info')}">
							<i class="fa fa-user"></i>
							({:session('user_auth.username')})
							<!-- 个人资料 -->
						</a>
					</li>
					<li>
						<a href="{:url('admin/User/editpwd')}">
							<i class="fa fa-cog"></i>
							修改密码
						</a>
					</li>
					<li>
						<a href="{:url('admin/index/logout')}">
							<i class="fa fa-power-off"></i>
							安全退出
						</a>
					</li>
					
					
				</ul>
			</div>
		</div>
	</header>

	<div id="page-wrapper" class="container">
		<div class="row">
			<div id="nav-col">
				<section id="col-left" class="col-left-nano">
					<div id="col-left-inner" class="col-left-nano-content">
						<div id="sidebar-nav">
							<ul class="nav nav-pills nav-stacked">
								{volist name="__menu__" id="nav"}
									{empty name="nav.doc"}
										
										<li class="{$nav['style']}">
										
										{if $nav['hidden_status']==1}
											<a href="#" class="ahide">
											<!-- <i class=" {$item['hidden_status']==1?'glyphicon glyphicon-lock ':'fa fa-'}{$item['icon']|default='file'}"></i> -->
											<img src="__PUBLIC__/images/gf_lock.png" style="    width:14px;    vertical-align: sub;">
											{/if}
											{if $nav['hidden_status']==0}
												<a href="{$nav['url']|url}">
												<i class="fa fa-{$nav['icon']|default='file'}"></i>
											{/if}
												<span>{$nav['title']}</span>
											</a>
										</li>
										
									{else /}
									<li class="">
										<a href="#{$nav['id']}" class="dropdown-toggle mymenu" data-id="{$nav['id']}">
											<i class="fa fa-{$nav['icon']|default='file'}"></i>
											<span>{$nav.title}</span>
											<i class="fa fa-angle-right drop-icon"></i>
									   </a>
									   <ul class="submenu">
										{volist name="nav.doc" id="item"}
											{empty name="item.doc"}
											<li class="{$item['style']}">
												{if $item['style'] == 'active'}
												{php} $meta_title = $item['title'];{/php}
												{/if}
													{if $item['hidden_status']==1}
													<a href="#" class="ahide">
													<!-- <i class=" {$item['hidden_status']==1?'glyphicon glyphicon-lock ':'fa fa-'}{$item['icon']|default='file'}"></i> -->
													<img src="__PUBLIC__/images/gf_lock.png" style="    width:11px;    vertical-align: sub;">
													{/if}
													{if $item['hidden_status']==0}
													<a href="{$item['url']|url}">
													<i class="fa fa-{$item['icon']|default='file'}"></i>
													{/if}
													<span>{$item['title']}</span>
													<!-- 编辑台 -->
													{if $item['id'] == 231}
													(<span class="" id="menu_tip_{$item['id']}">0</span>)
													{/if}
													<!-- 工作台 -->
													{if $item['id'] == 232}
													(<span class="" id="menu_tip_{$item['id']}">0</span>)
													{/if}
													<!-- 图片-工作台 -->
													{if $item['id'] == 260}
													(<span class="" id="menu_tip_{$item['id']}">0</span>)
													{/if}

													<!-- 图片-工作台 -->
													{if $item['id'] == 261}
													(<span class="" id="menu_tip_{$item['id']}">0</span>)
													{/if}
												</a>
											</li>
											{else /}
											{if $item['id'] > 200}
											<li class="{$item['style']}">
													{if $item['hidden_status']==1}
													<a href="#" class="dropdown-toggle ahide" >
													<!-- <i class=" {$item['hidden_status']==1?'glyphicon glyphicon-lock ':'fa fa-'}{$item['icon']|default='file'}"></i> -->
													<img src="__PUBLIC__/images/gf_lock.png" style="    width:11px;    vertical-align: sub;">
													{/if}
													{if $item['hidden_status']==0}
													<a href="{$item['url']|url}" class="dropdown-toggle">
													<i class="fa fa-{$item['icon']|default='file'}"></i>
													{/if}
													<span>{$item['title']}</span>
													<i class="fa fa-angle-right drop-icon"></i>
												</a>
												<ul class="submenu">
												{volist name="item.doc" id="item2"}
												<!-- 这里只让新加的菜单 有子菜单 功能  于2022-11-04之前加的菜单 不让他有这个功能 了--2022-11-15以下级菜单 不用了 -->
												{if $item2['id'] > 200}
													<li class="{$item2['style']}">
														<a href="{$item2['url']|url}" style="padding-left: 60px;">
															<span>|--{$item2['title']}</span>
															<!-- 编辑台 -->
															{if $item2['id'] == 231}
															(<span class="" id="menu_tip_{$item2['id']}">0</span>)
															{/if}
															<!-- 工作台 -->
															{if $item2['id'] == 232}
															(<span class="" id="menu_tip_{$item2['id']}">0</span>)
															{/if}
														</a>
													</li>
													{/if}
												{/volist}
												</ul>
											</li>
											{else/}
											<li class="{$item['style']}">
													{if $item['hidden_status']==1}
													<a href="#" class="ahide" >
													<!-- <i class=" {$item['hidden_status']==1?'glyphicon glyphicon-lock ':'fa fa-'}{$item['icon']|default='file'}"></i> -->
													<img src="__PUBLIC__/images/gf_lock.png" style="    width:11px;    vertical-align: sub;">
													{/if}
													{if $item['hidden_status']==0}
													<a href="{$item['url']|url}">
													<i class="fa fa-{$item['icon']|default='file'}"></i>
													{/if}
													<span>{$item['title']}</span>
												</a>
											</li>
											{/if}
											{/empty}
										{/volist}
										</ul>
									</li>
									{/empty}
								{/volist}
							</ul>
						</div>
					</div>
				</section>
			</div>

			<div id="content-wrapper" style="padding-bottom: 0;">
				<div class="row">
					<div class="col-lg-12">
						<div class="row">
							<div class="col-lg-12">
								<div id="content-header" class="clearfix">
									<div class="pull-left">
										<ol class="breadcrumb">
											<li>
												<a href="/admin">后台首页</a>
											</li>
											<li class="active">
												{if $meta_title}
												<span>{$meta_title}</span>
												{else/}
												<span>{:lang(request()->controller().'_'.request()->action())}</span>
												{/if}
											</li>
										</ol>
									</div>
									<div class="pull-right hidden-xs">
									</div>
								</div>
							</div>
						</div>
						<div class="row">
							<div class="col-lg-12">
								{block name="body"}{/block}
							</div>
						</div>
					</div>
				</div>
				<!---
				<footer id="footer-bar" class="row">
					
				</footer>--->
			</div>
		</div>
	</div>
</div>
<script>
	// setTimeout(function(){
	// 	$(".open").parent().slideDown(200);
	// 	$(".open").parent().parent().addClass("open");
	// }, 100)

	
	// $(".mymenu").click(function(){

	// 	if($(this).attr("data-id") == 206){
	// 		window.location.href="/admin/material/baidu_1_1.html"
	// 	}
	// })
	$('.ahide').on('click',function(){
		layer.msg('无权限哦！请通知管理员给权限(*^_^*)',{icon:4,time: 2000});
	});
</script>

{include file="admin@public/tool" /}
{include file="admin@public/footer" /}
{block name="script"}{/block}